<%@page import="com.crm.entity.Sources,java.util.*,com.crm.util.Constants" %>
<%@page import="com.crm.entity.SourceInfo"%>
<%@page import="com.crm.Business.CompareSrcVO"%>
<%@page import="com.crm.entity.Supplier"%>
<%
List<CompareSrcVO> partslist=(List<CompareSrcVO>)request.getAttribute("sourceInfo");
%>
 <input type="hidden" name="rowcount" value="<%=partslist.size()%>" id="columnCount"/>
             <input type="hidden" name="initcount" value="<%=partslist.size()%>" id="initCount"/>
 <table id="userTable"  border="0"  style="width:919px;" cellpadding="4" cellspacing="1" bgcolor="#C5E4EB">
          <tr>
           <td width="20"  align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"  style="background-repeat:repeat-x"></td>
            <td width="20"  align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"  style="background-repeat:repeat-x">S.No</td>
            <td width="32" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Part Number</td>
            <td width="32" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Description</td>
            <td width="32" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Make</td>
            <td width="20" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Req Qty</td>
            <td width="34" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">OfferingPartno</td>
            <td width="37" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Source</td>
            <td width="37" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Supplier</td>
            <td width="27" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Unit Price</td>
            <td width="34" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Currency</td>
            <td width="20" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Qty Available</td>
            <td width="23" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">M.O.Q</td>
            <td width="23" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">S.P.Q</td>
            <td width="36" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Conditions</td>
             </tr> 
        <% if(partslist.size()>0){
             for(int i=0;i<partslist.size();i++){  %>
        
          <tr>
          <td bgcolor="#FFFFFF">
          <input type="checkbox" name="idname" value="<%=i+1%>" /></td>
            <td bgcolor="#FFFFFF">
            <input name="sno" type="text" value="<%=i+1%>" size="5" />
            </td>
            <td align="left" valign="top" bgcolor="#FFFFFF">
            <input name="partno<%=i+1 %>"  id="partno<%=i+1 %>"  class="part" type="text" value="<%=partslist.get(i).getPartNum() %>"  size="5"/><input name="partid<%=i+1 %>"   class="part" type="hidden" value="<%=partslist.get(i).getPartid() %>"  size="5"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF">
            <input name="desc<%=i+1 %>"  id="desc<%=i+1 %>" type="text" value="<%=partslist.get(i).getDesc()%>"  size="5"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF">
            <input name="make<%=i+1 %>" id="make<%=i+1 %>" type="text"   value="<%=partslist.get(i).getMake() %>" size="5" /></td>
           <td align="left" valign="top" bgcolor="#FFFFFF">
            <input name="rqty<%=i+1%>" id="rqty<%=i+1%>" type="text" value="<%=partslist.get(i).getRequiredQty() %>" size="5" /></td>
             <td align="left" valign="top" bgcolor="#FFFFFF">
            <input name="opartno<%=i+1 %>" id="opartno<%=i+1 %>" type="text" value="<%=partslist.get(i).getPartNum()%>" size="5" /></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><%=partslist.get(i).getSourceName()%></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><%=partslist.get(i).getSupplierName()%></td>
            <td align="left" valign="top" bgcolor="#FFFFFF">
            <input name="uprice<%=i+1 %>"  id="uprice<%=i+1 %>" type="text" value="<%=partslist.get(i).getUprice()%>" size="5" /></td>
            
            <td align="left" valign="top" bgcolor="#FFFFFF"><%=partslist.get(i).getSourceCurrency() %></td>
           
            <td align="left" valign="top" bgcolor="#FFFFFF">
            <input name="qtyable<%=i+1 %>" id="qtyable<%=i+1 %>" type="text" value="<%=partslist.get(i).getAvailbleQty() %>" size="5" /></td>
            
            <td align="left" valign="top" bgcolor="#FFFFFF">
            <input name="moq<%=i+1 %>" id="moq<%=i+1 %>"  type="text" value="<%=partslist.get(i).getMoq()%>" size="5" /></td>
            <td align="left" valign="top" bgcolor="#FFFFFF">
            <input name="spq<%=i+1 %>" id="spq<%=i+1 %>" type="text" value="<%=partslist.get(i).getStdpackqty() %>" size="5" /></td>
          <td align="left" valign="top" bgcolor="#FFFFFF">
            <input name="conditions<%=i+1 %>" id="conditions<%=i+1 %>" type="text" value="" size="5" /></td>
      
          </tr>
      
          <%} 
          }
          %>  
        </table>